package SHIYAN;

class Students{
    String name;
    String id;
    String department;
    public Students(String name,String id,String department)
    {
        this.name= name;
        this.id = id;
        this.department = department;
    }
    public String getDepartment() {
        return department;
    }
    public String getId() {
        return id;
    }
    public String getName() {
        return name;
    }
    public void pri(String c,int i)
    {
        if(i==1)
            System.out.println("名字："+name+" "+"id: "+id+" " +"地址："+department);
        System.out.println(c);
    }
}
public class SHIYAN11 {
    public static void main(String[] args)
    {
        Students stu = new Students("小化","23450878563","liulang");
        stu.pri(stu.getId(),0);
        stu.pri(stu.getName(),0);
        stu.pri(stu.getDepartment(),0);
    }
}
